A layer 2 network is formed of communication apparatuses including a layer 2 switch that performs switching of layer 2 frames (frames are also referred to as packets) such as Ethernet frames. Owing to the decrease in the cost of the communication apparatuses that form the layer 2 network and the increase in the communication rate of the layer 2 network, the use of the layer 2 network is rapidly becoming popular.
The layer 2 network is basically formed having a tree structure and designed to prevent generation of loop areas. As for documents related to the present application, there are Japanese Laid-Open Patent Application No. 2006-352763 and Japanese Laid-Open Patent Application No. 2006-33275.
Although paths in a layer 2 network are usually designed to avoid generation of loop areas, a loop path may be generated due to an error in the settings of a communications apparatus or an error in the connecting of cables. When packets flow into such loop path, a packet loop (packets infinitely circle inside a loop path) occurs.
In a case where the packet loop occurs, unicast packets are caused to continue circling inside a loop path and are prevented from reaching a target destination. Moreover, broadcast packets increase whenever the broadcast packets pass through communication apparatuses that constitute a loop path and continue circling in both directions of the loop path. The bandwidth of a network is filled to its upper limit by the increase of packets and results in a so-called congestion state. This causes a significant delay of communications and leads to disconnection of communications.
Further, because a server connected to the layer 2 network receives a huge amount of packets, the packet loop could adversely affect the maintaining of a network service provided by the server.
In a case of recovering a network when a packet loop occurs, first, the flow of packets is physically stopped by removing the cables of a loop route or a packet flow path inside a communication apparatus is logically disconnected by changing the settings of the communication apparatus. By physically stopping the flow of packets or logically disconnecting the packet flow path, the packet loop is stopped. Then, the content of a FDB (Forwarding Database), which is the switching route storage data of the communications apparatus constituting the loop route, is reset. Finally, the settings and route connections that caused the loop are investigated.
Next, a process where a packet loop is generated in a layer 2 network is described with reference to FIG. 1.
As illustrated in FIG. 1, the layer 2 network includes a switching apparatus A, a switching apparatus B, and a switching apparatus C. Further, a1, a2, a3, and a4 are the ports used by the switching apparatus A. Further, b1, b2, and b3 are the ports used by the switching apparatus B. Further, c1, c2, c3, c4, and c5 are the ports used by the switching apparatus C.
Path 1 in FIG. 1 indicates a connecting path between the port a1 of the switching apparatus A and a point A. Path 2 indicates a connecting path between the port a2 of the switching apparatus A and a point B. Path 3 indicates a connecting path between the port a4 of the switching apparatus A and the port b1 of the switching apparatus B. Path 4 indicates a connecting path between the port a3 of the switching apparatus A and the port c5 of the switching apparatus C.
Path 5 indicates a connecting path between the port b2 of the switching apparatus B and the port c4 of the switching apparatus C. Path 6 indicates a connecting path between the port c1 of the switching apparatus C and a point C. Path 7 indicates a connecting path between the port b3 of the switching apparatus B and a point D. Path 8 indicates the port c3 of the switching apparatus C and a point E. Path 9 indicates the port c2 of the switching apparatus C and a point F.
In the example illustrated in FIG. 1, the path 3, the path 4, and the path 5 form a loop. In a case where a broadcast packet flows into the loop from, for example, the point A, the switching apparatus A copies the broadcast packet and sends the copied broadcast packets to the port a2, the port a3, and the port a4. The copied packets that are passed through the ports a2-a4 are sent to corresponding opposite ends at wire speed. That is, the packet from the port a2 is sent to the point B; the packet from the port a3 is sent to the port c5 of the switching apparatus C; and the packet from the port a4 is sent to the port b1 of the switching apparatus B.
Then, the packet reaching the port b1 of the switching apparatus B is copied and sent to the port b2 and the port b3. The copied packets that are passed through the ports b2 and b3 are sent to corresponding opposite ends at wire speed. That is, the packet from the port b2 is sent to the port c4 of the switching apparatus C; and the packet from the port b3 is sent to the point D.
Then, the packet reaching the port c1 of the switching apparatus C is copied and sent to the port c1, the port c2, the port c3, and the port c5. The packet from the port c1 is sent to the point C. The packet from the port c2 is sent to the point F. The packet from the port c3 is sent to the point E. The packet from the port c5 is sent to the port a3 of the switching apparatus A. The packet reaching the port a3 of the switching apparatus A is copied and sent to the ports a2, a4, and a1.
As described above, the packet flowing into the port a4 of the loop path continues circling in a direction from path 3→path 5→path 4→path 3 . . . . Further, the packet flowing into the port a3 of the loop path continues circling in a direction from path 4→path 5→path 3→path 4 . . . . Because a packet is copied at each port of a switching apparatus whenever the packet reaches the switching apparatus, packets are also sent to the path 1, the path 2, the path 6, the path 7, the path 8, and the path 9 which do not include a port that constitutes the loop path.
Next, a process where a packet loop is generated in a layer 2 network that forms a VLAN is described with reference to FIG. 2.
Similar to FIG. 1, FIG. 2 illustrates a layer 2 network including switching apparatuses A-C. In FIG. 2, VLAN-A is configured to pass through the ports a1 and a4 of the switching apparatus A and the ports b1 and b3 of the switching apparatus B. VLAN-B is configured to pass through the ports a2 and a3 of the switching apparatus A and the ports c5 and c3 of the switching apparatus C. Further, VLAN-C is configured to pass through the port c1 and c2 of the switching apparatus C.
For example, in a case where the path 3, the path 4, and the path 5 are connected as a VLAN, the packets of the VLAN-B will continue circling (loop) inside the VLAN of path 3, path 4, and path 5.
This affects the packets of the VLAN-A. That is, because the packets of VLAN-A and the packets of VLAN-B pass through the path 3, the large increase in the amount of packets flowing in the VLAN-B obstructs the flow of the packets of the VLAN-A. In this case, the packets of the VLAN-C are not affected by the packet loop because the VLAN-C is not connected to a loop path.
As for related art examples for detecting generation of a packet loop, there is a method of periodically sending Pings to the end points of a path. Because the bandwidth of a network path becomes congested in a case where a packet loop occurs, the generation of a packet loop can be detected by detecting abnormality in the traffic of packets.
However, even if generation of a packet loop can be detected, the path at which the packet loop is generated or the range affected by the packet loop cannot be perceived.